package com.creditease.cn.monitor.service.impl;

import java.util.Set;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import redis.clients.jedis.Jedis;

import com.creditease.cn.monitor.dao.redis.SlaveRedisNode;
import com.creditease.cn.monitor.service.SetService;
@Service
public class SetServiceImpl implements SetService{
	private Logger logger = LoggerFactory.getLogger(SetServiceImpl.class);
	
	@Autowired
	private SlaveRedisNode slaveRedisNode;
	
	public Set<String> getValue(String key) {
		Jedis jedis = slaveRedisNode.getConnection();
		Set<String> values = jedis.smembers(key);
		return values;
	}

}
